package com.gzhryc.shared_device.bxscn.code.dao.db;

import java.util.Date;

import com.gzhryc.common.NumberTools;
import com.gzhryc.jdbc.annotaion.Column;
import com.gzhryc.jdbc.annotaion.Join;
import com.gzhryc.jdbc.annotaion.PrimaryKey;
import com.gzhryc.jdbc.annotaion.Table;
import com.gzhryc.shared_device.bxscn.code.dao.enums.BXSCNShopFeeTemplateItemEnum;

@Table(name="bxscn_shop_fee_template_item")
public class BXSCNShopFeeTemplateItem {
	
	@PrimaryKey
	@Column(name="template_id",notNull = true, note = "模版ID")
	protected Long templateId;
	
	@PrimaryKey
	@Column(name="battery_type_id" ,notNull = true, note = "电池类型ID")
	protected String batteryTypeId;
	
	@PrimaryKey
	@Column(notNull = true, defVal="1", note = "类型")
	protected Integer type;
	
	@Column(name = "deposit_money", notNull = true, defVal = "100000", note = "押金，单位：分")
    protected Integer depositMoney;

    @Column(name = "day_money", notNull = true, defVal = "5000", note = "默认租金，单位：分")
    protected Integer dayMoney;

    @Column(name = "day_money_content", type = "TEXT", note = "租金按天设置")
    protected String dayMoneyContent;

    @Column(name = "update_date", autoUpdateTime = true, note = "最后修改时间")
    protected Date updateDate;

    @Column(name = "create_date", notNull = true)
    protected Date createDate;
    
    @Join(fromField="battery_type_id")
    protected PortableEnergyBatteryType batteryType;

	public Long getTemplateId() {
		return templateId;
	}

	public void setTemplateId(Long templateId) {
		this.templateId = templateId;
	}

	public String getBatteryTypeId() {
		return batteryTypeId;
	}

	public void setBatteryTypeId(String batteryTypeId) {
		this.batteryTypeId = batteryTypeId;
	}

	public Integer getType() {
		return type;
	}

	public void setType(Integer type) {
		this.type = type;
	}

	public Integer getDepositMoney() {
		return depositMoney;
	}

	public void setDepositMoney(Integer depositMoney) {
		this.depositMoney = depositMoney;
	}

	public Integer getDayMoney() {
		return dayMoney;
	}

	public void setDayMoney(Integer dayMoney) {
		this.dayMoney = dayMoney;
	}

	public String getDayMoneyContent() {
		return dayMoneyContent;
	}

	public void setDayMoneyContent(String dayMoneyContent) {
		this.dayMoneyContent = dayMoneyContent;
	}

	public Date getUpdateDate() {
		return updateDate;
	}

	public void setUpdateDate(Date updateDate) {
		this.updateDate = updateDate;
	}

	public Date getCreateDate() {
		return createDate;
	}

	public void setCreateDate(Date createDate) {
		this.createDate = createDate;
	}
	
	public PortableEnergyBatteryType getBatteryType() {
		return batteryType;
	}

	public void setBatteryType(PortableEnergyBatteryType batteryType) {
		this.batteryType = batteryType;
	}

	public String getTypeName() {
		return BXSCNShopFeeTemplateItemEnum.Type.note(this.type);
	}
	
	public String getDepositMoneyStr() {
		return NumberTools.getMoneyStr(this.depositMoney);
	}
	
	public String getDayMoneyStr() {
		return NumberTools.getMoneyStr(this.dayMoney);
	}
}
